home *** CD-ROM | disk | FTP | other *** search
/ IRIX 6.5 Complementary Applications 2004 May / SGI IRIX 6.5 Complementary Applications 2004 May.iso / dist / OpenOffice.idb / usr / OpenOffice / help / en / sbasic.jar / text / sbasic / common / 03010201.xml < prev    next >
Encoding:
Extensible Markup Language  |  2002-01-24  |  2.9 KB  |  35 lines

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <html><head><title>InputBox Function [Runtime]</title><meta name="filename" content="text/sbasic/common/03010201"/><meta name="language" content="en-US"/><help:css-file-link xmlns:help="http://openoffice.org/2000/help"/><!--The CSS style header method for setting styles--><style type="text/css">
  3.  
  4.         p.P1{
  5.                 }
  6.         p.P2{
  7.                 }
  8.         span.T1{
  9.                 font-weight:bold;}
  10.         </style></head><body>
  11.   
  12.   
  13.   <help:to-be-embedded Eid="inputbox" xmlns:help="http://openoffice.org/2000/help">
  14.   <p class="Head1"><help:link Id="66617">InputBox Function [Runtime]</help:link></p>
  15.   <p class="Paragraph">Displays a prompt in a dialog at which the user can input text. The input is assigned to a variable.</p>
  16.   </help:to-be-embedded>
  17.   <p class="Paragraph">The <span class="T1">InputBox</span> statement is a convenient method of entering text via a dialog. Confirm the input by clicking OK or pressing Return. The input is returned as the function return value. If you close the dialog with Cancel, <span class="T1">InputBox</span> returns a zero-length string ("").</p>
  18.   <p class="Paragraph"><span class="T1">Syntax</span>:</p>
  19.   <p class="Paragraph">InputBox (Msg As String[, Title As String[, Default As String[, x_pos As Integer, y_pos As Integer]]]]) <help:key-word value="InputBox" tag="kw66617_1" xmlns:help="http://openoffice.org/2000/help"/></p>
  20.   <p class="Paragraph"><span class="T1">Return value</span>:</p>
  21.   <p class="Paragraph">String</p>
  22.   <p class="Paragraph"><span class="T1">Parameter</span>:</p>
  23.   <p class="Paragraph">Msg: String expression displayed as the message in the dialog box.</p>
  24.   <p class="Paragraph">Title: String expression displayed in the title bar of the dialog box.</p>
  25.   <p class="Paragraph">Default: String expression displayed in the text box as default if no other input is given.</p>
  26.   <p class="Paragraph">x_pos: Integer expression that specifies the horizontal position of the dialog. The position is an absolute coordinate and does not refer to the window of the office application.</p>
  27.   <p class="Paragraph">y_pos: Integer expression that specifies the vertical position of the dialog. The position is an absolute coordinate and does not refer to the window of the office application.</p>
  28.   <p class="Paragraph">If <span class="T1">x_pos</span> and <span class="T1">y_pos</span> are omitted, the dialog is centered on the screen. The position is specified in <help:popup Id="66636" Eid="twips" xmlns:help="http://openoffice.org/2000/help">twips</help:popup>.</p>
  29.   <p class="P2">Example:</p>
  30.   <p class="PropText">Sub ExampleInputBox</p>
  31.   <p class="PropText">Dim sText As String</p>
  32.   <p class="PropText">sText <text:s text:c="" xmlns:text="http://openoffice.org/2000/text"/>= InputBox ("Please enter a phrase:","Dear User")</p>
  33.   <p class="PropText">MsgBox ( sText , 64, "Confirmation of phrase")</p>
  34.   <p class="PropText">End Sub</p>
  35.  </body></html>